package priv.yiyuan.example.design.visitor.policy;

import priv.yiyuan.example.design.visitor.PolicyVisitor;

/**
 * @author YiYuan
 * @data 2025/7/30
 * @apoNote
 */
public class CarInsurance implements InsurancePolicy {

    private String carModel;

    private int year;

    public CarInsurance(String carModel, int year) {
        this.carModel = carModel;
        this.year = year;
    }

    public String getCarModel() {
        return carModel;
    }

    public int getYear() {
        return year;
    }

    @Override
    public void accept(PolicyVisitor visitor) {
        visitor.visit(this);
    }

}
